package com.hd.trans.network.component

import com.hd.trans.share.UrlDownloadRequest


interface FileTranslateCallback:  UrlDownloadRequest.DownloadCallback {
    /**
     * 开始翻译
     */
    fun startTranslate()

    /**
     * 翻译任务ID
     */
    fun onTaskId(taskId: String?)

    /**
     * 翻译任务状态
     * @param status 状态
     * @param estimatedTime 预计剩余时间
     * @param pendingCount 等待翻译的文件数
     * @param progress 任务进度
     */
    fun onTaskStatus(status: String?, estimatedTime: Long, pendingCount: Int, progress: Int = 0)

    /**
     * 翻译完成
     */
    fun onTranslateCompleted(
        originalContent: String?,
        transContent: String?,
        fromLangCode: String?,
        toLangCode: String?,
        status: Boolean,
    )

    /**
     * 翻译失败
     */
    fun onTranslateFailed(code: Int, msg: String?)
}